package com.boang.math;

/*
    @author:sa
    @date:2024/11/22 11:45
*/
public class MathDemo {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            double random = Math.random();
            System.out.println(random);
            System.out.println(random*100);
            double floor = Math.floor(random*100);
            System.out.println("向下取整"+(int)floor);
            double ceil = Math.ceil(random*100);
            System.out.println("向上取整"+(int)ceil);
        }
    }
}